<%@ page import="com.foreknow.model.GuestBook" %><%--
  Created by IntelliJ IDEA.
  User: jzy
  Date: 2021/8/23
  Time: 20:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--引用标签库 taglib--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>Title</title>
    <!-- Bootstrap core CSS -->
    <link href="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.12/dist/css/bootstrap.min.css"
          rel="stylesheet">
</head>
<body>
<%
    GuestBook gb = (GuestBook) request.getAttribute("gb");
    int id = gb.getId();
%>
<div style="width: 80%;margin: 10px auto;">
<form method="post" action="UpdateServlet">
    <input type="hidden" name="id" value="<%=id%>">
    <div class="form-group">
        <label for="gbName">姓名</label>
        <input type="text" class="form-control" id="gbName" name="name" value="<%=gb.getName() %>">
    </div>
    <div class="form-group">
        <label for="gbPhone">电话</label>
        <input type="text" class="form-control" id="gbPhone" name="phone" value="<%=gb.getPhone() %>">
    </div>
    <div class="form-group">
        <label for="gbEMail">邮箱</label>
        <input type="email" class="form-control" id="gbEMail" name="email" value="<%=gb.getEmail() %>">
    </div>
    <div class="form-group">
        <label for="gbTitle">标题</label>
        <input type="text" class="form-control" id="gbTitle" name="title"  value="<%=gb.getTitle() %>">
    </div>
    <div class="form-group">
        <label for="gbContent">内容</label>
        <input type="text" class="form-control" id="gbContent" name="content"  value="<%=gb.getContent() %>">
    </div>
    <button class="btn btn-primary">提交</button>
</form>
</div>
</body>
</html>
